﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DLL.User
{
	/// <summary>
	/// 用户实体类
	/// </summary>
	/// <![CDATA[2014-7-30 08:56:46]]>
	public class Entity : EntityBase
	{
		#region 属性
		public string strUsername = "";		// 用户名
		public string strPassword = "";		// 密码
		public int nUserGroupID = 0;		// 用户所属用户组ID
		public int nDepartmentID = 0;		// 用户所属单位ID
		public string strPersonID = "";		// 人力资源唯一吗
		public string strJobNumber = "";
		public string strPersonName = "";
		public string strIDCard = "";
		public int nRegister;		// 用户是否是自己注册

		public string strColumnIDs = "";		// 有权访问的栏目ID
		public string strUserGroupName = "";		// 用户组
		public string strDepartmentName = "";		// 用户所属单位的名称
		public string strWebColumnIDs = "";		// 有权访问的前台栏目ID
		#endregion 属性

		private Config clsConfig = new Config();

		#region Get，Set属性
		/// <summary>
		/// 用户是否是自己注册
		/// </summary>
		public bool Register
		{
			get
			{
				if (nRegister == clsConfig.nRegister_Yes)
				{
					return true;
				}
				else
				{
					return false;
				}
			}
			set
			{
				if (value)
				{
					nRegister = clsConfig.nRegister_Yes;
				}
				else
				{
					nRegister = clsConfig.nRegister_No;
				}
			}
		}
		/// <summary>
		/// 用户名
		/// </summary>
		/// <![CDATA[2014-7-30 09:04:17]]>
		public string Username
		{
			get { return strUsername; }
			set { strUsername = value.Trim(); }
		}
		/// <summary>
		/// 密码
		/// </summary>
		/// <![CDATA[2014-7-30 09:05:05]]>
		public string Password
		{
			get { return strPassword; }
			set { strPassword = value.Trim(); }
		}
		/// <summary>
		/// 用户所属用户组ID
		/// </summary>
		/// <![CDATA[2014-7-30 10:22:41]]>
		public int UserGroupID
		{
			get { return nUserGroupID; }
			set { nUserGroupID = value; }
		}
		/// <summary>
		/// 有权访问的栏目ID
		/// </summary>
		/// <![CDATA[2014-8-3 14:56:30]]>
		public string ColumnIDs
		{
			get { return strColumnIDs; }
			set { strColumnIDs = value.Trim(); }
		}
		/// <summary>
		/// 用户组
		/// </summary>
		/// <![CDATA[2014-8-10 15:42:20]]>
		public string UserGroupName
		{
			get { return strUserGroupName; }
			set { strUserGroupName = value.Trim(); }
		}
		/// <summary>
		/// 用户所属单位ID
		/// </summary>
		/// <![CDATA[2014-8-15 11:03:09]]>
		public int DepartmentID
		{
			get { return nDepartmentID; }
			set { nDepartmentID = value; }
		}
		/// <summary>
		/// 用户所属单位的名称
		/// </summary>
		/// <![CDATA[2014-8-15 11:33:18]]>
		public string DepartmentName
		{
			get { return strDepartmentName; }
			set { strDepartmentName = value.Trim(); }
		}
		/// <summary>
		/// 有权访问的前台栏目ID
		/// </summary>
		/// <![CDATA[2014-8-17 17:03:00]]>
		public string WebColumnIDs
		{
			get { return strWebColumnIDs; }
			set { strWebColumnIDs = value.Trim(); }
		}
		public string PersonID
		{
			get { return strPersonID; }
			set { strPersonID = value.Trim(); }
		}
		public string JobNumber
		{
			get { return strJobNumber; }
			set { strJobNumber = value.Trim(); }
		}
		public string PersonName
		{
			get { return strPersonName; }
			set { strPersonName = value.Trim(); }
		}
		public string IDCard
		{
			get { return strIDCard; }
			set { strIDCard = value.Trim(); }
		}
		#endregion Get，Set属性

		/// <summary>
		/// 用户实体构造函数
		/// </summary>
		/// <![CDATA[2014-7-30 09:06:07]]>
		public Entity()
			: base()
		{
			nRegister = clsConfig.nRegister_Yes;
		}
	}
}
